package com.chouxiaozi.controller;

import com.chouxiaozi.feignclient.PaymentFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class PaymentController {
    @Autowired
    PaymentFeignClient paymentFeignClient;

    @GetMapping("/consumer/hello")
    public String getPaymentById() {
        return paymentFeignClient.getPaymentById();
    }

    @GetMapping("/consumer/feign/timeout")
    public String paymentFeignTimeOut(){
        return paymentFeignClient.paymentFeignTimeOut();
    }
}
